package com.livi.security.controller;

import com.livi.security.model.commom.BaseResponse;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class TestController {

    // 无需登陆
    @GetMapping("/hello")
    public BaseResponse hello() {
        return new BaseResponse<String>("load success", "anyone can see");
    }

    // 普通用户权限
    @GetMapping("/getUser")
    public BaseResponse user() {
        return new BaseResponse<String>("load success", "user role 666 can see");
    }

    // 管理员权限
    @GetMapping("/getAdmin")
    public BaseResponse admin() {
        return new BaseResponse<String>("load success", "user role can see");
    }
}
